package com.ktjy.web.service.impl;

import com.ktjy.web.dao.UserDao;
import com.ktjy.web.dao.impl.UserDaoImpl;
import com.ktjy.web.entity.Page;
import com.ktjy.web.entity.User;
import com.ktjy.web.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {

    UserDao dao= new UserDaoImpl();

    @Override
    public User UserLogin(String userName, String password) {
        return dao.UserLogin(userName,password);
    }

    @Override
    public List<User> selectAll() {
        return dao.selectAll();
    }

    @Override
    public User selectById(int id) {
        return dao.selectById(id);
    }

    @Override
    public int insert(User user) {
        return 0;
    }

    @Override
    public int update(User user) {
        return dao.update(user);
    }

    @Override
    public int deleteById(int id) {
        return dao.deleteById(id);
    }

    @Override
    public List<User> page(String userName, String mobile, int pageNo, int pageSize) {
        return dao.page(userName,mobile,pageNo,pageSize);
    }

    @Override
    public int count() {
        return dao.count();
    }
}
